GtkStyleContext *context,
const GValue *specified)
{
- g_value_init (computed, _gtk_style_property_get_value_type (GTK_STYLE_PROPERTY (property)));
_gtk_css_style_compute_value (computed, context, specified);
}
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (G_IS_VALUE (specified));
+ g_value_init (computed, _gtk_css_style_property_get_computed_type (property));
+
property->compute_value (property, computed, context, specified);
}
GtkStyleContext *context,
const GValue *specified)
{
- g_value_init (computed, GDK_TYPE_RGBA);
-
- /* for when resolvage fails */
-restart:
-
if (G_VALUE_HOLDS (specified, GTK_TYPE_SYMBOLIC_COLOR))
{
GtkSymbolicColor *symbolic = g_value_get_boxed (specified);
}
else
{
- specified = _gtk_css_style_property_get_initial_value (property);
- goto restart;
+ color_compute (property,
+ computed,
+ context,
+ _gtk_css_style_property_get_initial_value (property));
}
}
if (image)
image = _gtk_css_image_compute (image, context);
- g_value_init (computed, GTK_TYPE_CSS_IMAGE);
g_value_take_object (computed, image);
}
style = _gtk_css_style_property_lookup_by_id (_gtk_css_style_property_get_id (property) - 1);
border_style = g_value_get_enum (_gtk_style_context_peek_property (context, _gtk_style_property_get_name (GTK_STYLE_PROPERTY (style))));
- g_value_init (computed, G_TYPE_INT);
if (border_style == GTK_BORDER_STYLE_NONE ||
border_style == GTK_BORDER_STYLE_HIDDEN)
g_value_set_int (computed, 0);